import React from 'react';
import { Space, Table, Button} from 'antd';
import moment from 'moment';
import { getFormSubmissionInfo } from 'react-router-dom/dist/dom';

export default function AccountsList() {
	const [data, setData] = React.useState([]);
	const [total, setTotal] = React.useState(0);
	const [loading, setLoading] = React.useState(false)
	React.useEffect(() => {
	  //这个回调函数就相当于vue2中的mounted
	  getData();
	}, []);
	const columns = [
	  {
	    title: 'Name',
	    dataIndex: 'name',
	    key: 'name',
	  },
	  {
	    title: 'Age',
	    dataIndex: 'age',
	    key: 'age',
	  },
	  {
	    title: 'Address',
	    dataIndex: 'address',
	    key: 'address',
	  },
	  {
	    title: '操作',
	    render: (_, record) => (
	      <Button type="primary" danger onClick={delAccount}>删除</Button>
	    ),
	  },
	];
	const [data,setData] = React.useState([]);
	function delAccount(id){
		
	}
  return (
    <Table columns={columns} dataSource={data} />;
  )
}
